package com.qms.qep.service;

import java.util.List;
import com.qms.qep.domain.DefectRecord;

/**
 * 缺陷记录Service接口
 * 
 * @author DefectRecord
 */
public interface IDefectRecordService 
{
    /**
     * 查询缺陷记录
     * 
     * @param id 缺陷记录主键
     * @return 缺陷记录
     */
    public DefectRecord selectDefectRecordById(Integer id);

    /**
     * 查询缺陷记录列表
     * 
     * @param defectRecord 缺陷记录
     * @return 缺陷记录集合
     */
    public List<DefectRecord> selectDefectRecordList(DefectRecord defectRecord);

    /**
     * 新增缺陷记录
     * 
     * @param defectRecord 缺陷记录
     * @return 结果
     */
    public int insertDefectRecord(DefectRecord defectRecord);

    /**
     * 修改缺陷记录
     * 
     * @param defectRecord 缺陷记录
     * @return 结果
     */
    public int updateDefectRecord(DefectRecord defectRecord);

    /**
     * 批量删除缺陷记录
     * 
     * @param ids 需要删除的缺陷记录主键集合
     * @return 结果
     */
    public int deleteDefectRecordByIds(Integer[] ids);

    /**
     * 删除缺陷记录信息
     * 
     * @param id 缺陷记录主键
     * @return 结果
     */
    public int deleteDefectRecordById(Integer id);
    
    /**
     * 根据检验任务ID查询缺陷记录
     *
     * @param inspectionTaskId 检验任务ID
     * @return 缺陷记录列表
     */
    public List<DefectRecord> selectDefectRecordByTaskId(Integer inspectionTaskId);
    
    /**
     * 统计缺陷记录数量
     *
     * @param defectRecord 缺陷记录
     * @return 统计结果
     */
    public int countDefectRecord(DefectRecord defectRecord);
} 